package com.yuanqi.java.dto;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

/**
 * 采购退货单DTO
 */
@Data
public class PurchaseReturnOrderDTO {

    /**
     * 关联采购订单ID
     */
    @NotNull(message = "采购订单ID不能为空")
    private Long orderId;

    /**
     * 退货总金额
     */
    @NotNull(message = "退货总金额不能为空")
    private BigDecimal totalReturnAmount;

    /**
     * 备注
     */
    private String remark;

    /**
     * 退货商品列表
     */
    @NotNull(message = "退货商品列表不能为空")
    @Size(min = 1, message = "退货商品列表不能为空")
    @Valid
    private List<PurchaseReturnOrderItemDTO> items;
}

